using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using BusinessLayer;

namespace DeAn_LapTrinhCSDL
{
    public partial class ReportForm : Form
    {
        public DataTable dataSource;
        NhaCC ncc = new NhaCC();
        VatTu vt = new VatTu();
        DonDH ddh = new DonDH();
        PNhap pn = new PNhap();

        public ReportForm()
        {
            InitializeComponent();
            dataSource = new DataTable();
        }

        private void ReportForm_Load(object sender, EventArgs e)
        {
            ddh.connect.ConnectionString = Program.strConnect;
            vt.connect.ConnectionString = Program.strConnect;
            ncc.connect.ConnectionString = Program.strConnect;
            pn.connect.ConnectionString = Program.strConnect;

           //Report.rpNhaCC rpt = new DeAn_LapTrinhCSDL.Report.rpNhaCC();
            //Report.rpDonDH rpt = new DeAn_LapTrinhCSDL.Report.rpDonDH();
            Report.rpPNhap rpt = new DeAn_LapTrinhCSDL.Report.rpPNhap();

            rpt.DataSource = pn.GetData(); // ddh.GetData();// vt.GetData(); // dataSource;
            printControl1.PrintingSystem = rpt.PrintingSystem;
            rpt.CreateDocument();

        }
    }
}